# Contributor: David Demelier <markand@malikania.fr>
# Maintainer: David Demelier <markand@malikania.fr>
pkgname=libretro-gme
pkgver=0_git20240628
pkgrel=0
_commit="a469ce3f6e9cc674e615de3955ec7b25e949e5d8"
pkgdesc="port of blargg's Game_Music_Emu library"
url="https://github.com/libretro/libretro-gme"
arch="all !ppc64le"
license="GPL-3.0-only"
source="$pkgname-$_commit.tar.gz::https://github.com/libretro/libretro-gme/archive/$_commit.tar.gz"
builddir="$srcdir/libretro-gme-$_commit"
options="!check" # No tests

build() {
	# Define _DEFAULT_SOURCE for deps/libretro-common
	# https://github.com/libretro/libretro-gme/issues/35
	CFLAGS="$CFLAGS -D_DEFAULT_SOURCE" make
}

package() {
	install -Dm644 gme_libretro.so "$pkgdir"/usr/lib/libretro/gme_libretro.so
}

sha512sums="
59af04c28cc5e72ac2996f2268e56fb1e52d6117722edcda6292dec1f65f3999d711189dd48a4c1153b1ef6e6b0230bbae2eb9f89779056f3455d6486f00c90b  libretro-gme-a469ce3f6e9cc674e615de3955ec7b25e949e5d8.tar.gz
"
